/*
 * ModifiedEvent.h
 *
 *  Created on: 2010-8-31
 *      Author: wenjian
 */

#ifndef MODIFIEDEVENT_H_
#define MODIFIEDEVENT_H_

#include <event/Event.h>

namespace Ed {
  class ModifiedSupport;

  /**
   * 被修改状态改变事件，请不要在处理事件时修改ModifiedSupport中的状态值
   */
  class ModifiedEvent: public Thk::Event {
    public:
      ModifiedEvent(ModifiedSupport* ms, void* source=NULL)
        :Event(ModifiedEvent::Type, source), modifiedSupport(ms){};

      virtual ~ModifiedEvent(){};

      /**
       * 检查被修改状态
       */
      inline const ModifiedSupport* getModifiedSupport() const{
        return modifiedSupport;
      }

      //定义事件类型
      static EventType Type;

    private:
      ModifiedSupport* modifiedSupport;
  };
}

#endif /* MODIFIEDEVENT_H_ */
